<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        for (var num = 100; num <= 999; num += 1) {
            var a = 0,
                b = 0,
                c = 0;
            a = parseInt(num / 100);
            b = parseInt((num - 100 * a) / 10);
            c = parseInt(num - 100 * a - 10 * b);
            if (num == a * a * a + b * b * b + c * c * c) {
                document.write(num + "<br>");
            }
        }
    </script>
</body>

</html>